package com.gluxen.test;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.gluxen.util.DateUtil;

public class testFormat {

    public static void main(String[] args) throws ParseException {
  
//        Date str = DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss");
//        Date str2=DateUtil.stringToDate("2016-09-25 23:30:32","yyyy-MM-dd HH:mm:ss" );
//        SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        Date date1=new Date();
//        Date date2=new Date();
//        date1=format.parse("2016-09-27 23:45:32");
////        date2=format.parse("2016-09-24 23:30:32");
//        long day = (date1.getTime()-date2.getTime())/(24*60*60*1000);
    	String str1 = DateUtil.dateToString(new Date(),"yyyy-MM-dd ");//获取当前日期
    	Date str=DateUtil.stringToDate(str1, "yyyy-MM-dd ");
        System.out.println(str);
}
}